home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-wos-src / vlink / version.c < prev    next >
C/C++ Source or Header  |  1999-01-01  |  5KB  |  110 lines

  1. /* $VER: vlink version.c V0.6b (16.01.99)
  2.  *
  3.  * This file is part of vlink, a portable linker for multiple
  4.  * object formats.
  5.  * Copyright (c) 1997-99  Frank Wille
  6.  *
  7.  * vlink is freeware and part of the portable and retargetable ANSI C
  8.  * compiler vbcc, copyright (c) 1995-99 by Volker Barthelmann.
  9.  * vlink may be freely redistributed as long as no modifications are
  10.  * made and nothing is charged for it. Non-commercial usage is allowed
  11.  * without any restrictions.
  12.  * EVERY PRODUCT OR PROGRAM DERIVED DIRECTLY FROM MY SOURCE MAY NOT BE
  13.  * SOLD COMMERCIALLY WITHOUT PERMISSION FROM THE AUTHOR.
  14.  *
  15.  *
  16.  * v0.6b (16.01.99) phx
  17.  *       Changed copyright for 1999.
  18.  * v0.5a (28.06.98) phx
  19.  *       text "-w suppress warnings" was missing.
  20.  * v0.4  (06.06.98) phx
  21.  *       -sc forces merging of all code sections in an executable.
  22.  *       -sd forces merging of all data and bss sections in an executable.
  23.  *       -multibase prevents auto-merging of sections, which are accessed
  24.  *       base-relative.
  25.  * v0.3a (18.04.98) phx
  26.  *       -baseoff was missing in help text.
  27.  *       Updated some other help texts.
  28.  * v0.3  (16.04.98) phx
  29.  *       -R directs vlink to generate short relocs, if the target format
  30.  *       allows this. It is for example supported by ELF and AmigaDos.
  31.  *       Commented some options out, which are still not supported.
  32.  *       -F for reading files, which contain a list of input files
  33.  * v0.1  (27.02.98) phx
  34.  *       First version that seems to link AmigaOS ADOS and EHF
  35.  *       objects and libraries. Many common features, like linking
  36.  *       sections together which have relative references, are
  37.  *       still missing. Also, PowerPC-ELF32 support is about to come.
  38.  * v0.0  (04.08.97) phx
  39.  *       File created. Project started on a beautiful summer-day
  40.  *       at the North Sea beach of Cuxhaven. :)
  41.  */
  42.  
  43.  
  44. #define VERSION_C
  45. #include "vlink.h"
  46.  
  47.  
  48. void show_version(void)
  49. {
  50.   printf(PNAME " V%d.%d%c (c)1997-99 by Frank Wille\n"
  51.          "build date: " __DATE__ ", " __TIME__ "\n\n"
  52.          ,VERSION,REVISION,PLEVEL?('a'+PLEVEL-1):' ');
  53. }
  54.  
  55.  
  56. void show_usage(void)
  57. {
  58.   show_version();
  59.  
  60.   printf("Usage: " PNAME " [-dhrstvwxMRSX] [-B linkmode] [-b targetname] "
  61.          "[-baseoff offset] "
  62. #if 0 /* not implemented */
  63.          "[-D symbol[=value]] [-e entrypoint] "
  64. #endif
  65.          "[-F filename] [-L library-search-path] [-l library-specifier] "
  66.          "[-multibase] [-nostdlib] [-o filename] [-sc] [-sd] "
  67. #if 0 /* not implemented */
  68.          "[-T seg addr] [-u symbol] "
  69. #endif
  70.          "[-V version] [-y symbol] "
  71.          "input-files...\n\nOptions:\n"
  72.  
  73.          "<input-files>     object files and libraries to link\n"
  74.          "-F<file>          read a list of input files from <file>\n"
  75.          "-o<output>        output file name\n"
  76.          "-b<target>        output file format\n"
  77.          "-l<libspec>       link with specified library (static or dynamic)\n"
  78.          "-L<libpath>       add search path for libraries\n"
  79. #if 0 /* not implemented */
  80.          "-e<entrypoint>    address of program's entry point\n"
  81. #endif
  82.          "-y<symbol>        trace symbol accesses by the linker\n"
  83. #if 0 /* not implemented */
  84.          "-D<symbol>[=exp]  define a symbol\n"
  85.          "-u<symbol>        mark a symbol as undefined\n"
  86.          "-T<name> <addr>   define base address of a section\n"
  87. #endif
  88.          "-B<mode>          link mode: static, dynamic, shareable, symbolic\n"
  89.          "-dn               same as: -Bstatic\n"
  90.          "-dy               same as: -Bdynamic\n"
  91.          "-V<version>       minimum version of shared object\n"
  92.          "-baseoff<offset>  offset for base relative relocations\n"
  93.          "-nostdlib         don't use default search path\n"
  94.          "-multibase        don't auto-merge base-relative accessed sections\n"
  95.          "-sc               merge all code sections\n"
  96.          "-sd               merge all data and bss sections\n"
  97.          "-t                trace file accesses by the linker\n"
  98.          "-M                print segment mappings and symbol values\n"
  99.          "-r                generate relocatable object\n"
  100.          "-R                use short form for relocations\n"
  101.          "-s                strip all symbols\n"
  102.          "-S                strip debugging symbols only\n"
  103.          "-x                discard all local symbols\n"
  104.          "-X                discard temporary local symbols\n"
  105.          "-w                suppress warnings\n"
  106.          "-v                print version and implemented targets\n"
  107.          "-h                shows this help text\n"
  108.          );
  109. }
  110.